package com.matrix.java.chap_05;

/*
    千克与磅之间的互换
 */
public class Ex5_05 {
    public static void main(String[] args) {
        final double Proportion = 2.2;
        System.out.println("千克" + "-------" + "磅" + "-------" + "磅" + "-------" + "千克");
        for (int i = 1; i < 101; i++) {
            double KG2Pound, Pound2KG;
            int m = -1;
            m += 2 * i;
            KG2Pound = m * Proportion;
            System.out.printf("%d%s%.1f", m, "--------", KG2Pound);
            int n = 15;
            n += 5 * i;
            Pound2KG = n / Proportion;
            System.out.printf("%s%d%s%.2f%n", "--------", n, "--------", Pound2KG);
        }
    }
}
